Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support transpiled transformers #11193

Merged
merged 5 commits into from
Mar 14, 2021

Conversation

SimenB
Copy link
Member

@SimenB SimenB commented Mar 14, 2021

Summary

Vaguely related to #8810. We don't transpile at runtime, but pre-transpiled modules should load fine

Test plan

Green CI

@netlify
Copy link

netlify bot commented Mar 14, 2021

Deploy preview for jestjs ready!

Built without sensitive environment variables with commit 2411699

https://deploy-preview-11193--jestjs.netlify.app

@netlify
Copy link

netlify bot commented Mar 14, 2021

Deploy preview for jestjs ready!

Built without sensitive environment variables with commit 76b2b75

https://deploy-preview-11193--jestjs.netlify.app

@codecov-io
Copy link

Codecov Report

Merging #11193 (76b2b75) into master (dd13096) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master   #11193   +/-   ##
=======================================
  Coverage   64.28%   64.28%           
=======================================
  Files         307      307           
  Lines       13458    13458           
  Branches     3285     3285           
=======================================
  Hits         8652     8652           
  Misses       4100     4100           
  Partials      706      706           
Impacted Files Coverage Δ
packages/babel-jest/src/index.ts 54.05% <ø> (ø)
packages/jest-transform/src/ScriptTransformer.ts 72.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update dd13096...76b2b75. Read the comment docs.

@@ -255,7 +255,7 @@ class ScriptTransformer {
let transformer: Transformer;

try {
transformer = require(transformPath);
transformer = interopRequireDefault(require(transformPath)).default;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@SimenB This incorrectly assumes that a Jest transformer does not use export const createTransformer instead of export default { createTransformer }.

aleclarson added a commit to aleclarson/esbuild-jest that referenced this pull request May 4, 2021
@github-actions
Copy link

github-actions bot commented Jun 4, 2021

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 4, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants